package cn.edu.gsau.info.controller;

import cn.edu.gsau.info.models.Code;
import cn.edu.gsau.info.models.Kanwu;
import cn.edu.gsau.info.models.ResponseResult;
import cn.edu.gsau.info.service.IKanwuNameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/kanwuname")
public class KanwuNameController {

    @Autowired
    IKanwuNameService kanwuNameService;


    @GetMapping("/findall")
    public ResponseResult findall() {
        List<Kanwu> list = kanwuNameService.list();
        return new ResponseResult(Code.GET_OK, "查询成功", list);
    }
}
